This application is based on Japanese Patent Application No. 2000-279219 filed on Sep. 14, 2000, the contents of which are hereby incorporated by reference.
1. Field of the Invention
The present invention relates to a method for extracting a surface from three-dimensional shape data, an apparatus for extracting a surface from three-dimensional shape data and a recording medium which stores a program for the same.
2. Description of the Prior Art
Conventionally, three-dimensional shape data of a component is used for examining its size and finish precision.
For example, there has been proposed an apparatus that can display three-dimensional shape image of a component on a display and calculate distances between a specific surface and a specific point designated by a user to display the calculation results. A problem detected with this method is that the surface appointed by the user is in fact a polygon comprised in the surface and, therefore, the distances calculated based on the polygon is variable depending on an angle of the polygon. A surface generally comprises a collection of polygons; however, orientations of the polygons are non-uniform.
Elements such as a surface, a cylinder and the like may be extracted from three-dimensional data of a component by comparing the three-dimensional data with CAD data of the same component. A side forming an outline of the component is then extracted based on the extracted elements. Distances between the extracted elements and the side are calculated, and the calculated values are compared with design values.
Various three-dimensional measurement devices of non-contact type or contact type may be used for obtaining three-dimensional shape data of a component.
In the above-described conventional method, CAD data of a component is used for extracting a surface and a side of the component. Accordingly, in the absence of the CAD data, user""s workload is increased since the user has to manually extract the surface or the like by selecting an appropriate area of three-dimensional data by, for example, visual observation thereof.
In some cases, a user may need to know types of surfaces comprised in three-dimensional data, orientations of the surfaces and so on. In such cases, a normal line of each of polygons (polygon surfaces) that are comprised in the three-dimensional shape data is displayed as a segment or a vector.
Above method is suitable for detecting an orientation of a polygon; however, the method is insufficient for detecting an orientation and a condition of a surface as an outline of a component comprising a collection of polygons. Further, since information of all the polygon surfaces is displayed in the method, the method is time consuming for a user who desires to selectively obtain necessary information of the surfaces.
Japanese Unexamined Patent Publication No. 10-162167 discloses a method wherein plotted three-dimensional coordinates are displayed on a display as a rectangular parallelepiped, and xy surface, yz surface and zx surface are displayed with being put different colors or patterns. This method improves visibility in the visual direction; however, it is insufficient for detecting directions of every surfaces of an object.
Three-dimensional shape data subjected to modeling of a three-dimensional measurement device typically include noise caused by surface characteristics, colors of surfaces or a shape of an object. Especially, such noise is increased in the vicinity of an edge of the object, thereby making it difficult to grasp the shape of the object.
The present invention is accomplished by considering above problems. The invention enables to extract a surface of an object from three-dimensional shape data without using CAD data or the like. An object of the invention is to facilitate comprehension of not only the surface but also a shape of the object.
A method according to one aspect of the present invention comprises; setting a standard surface or a standard line with respect to three-dimensional shape data comprising polygons representing an object in a space where the three-dimensional shape data exist; extracting polygons each having an inclination angle in a predetermined range; and setting the polygons as an extracted surface.
An apparatus according to another aspect of the present invention comprises a setting portion for setting, with respect to three-dimensional data comprising polygons representing an object, a standard surface or a standard line in a space where the three-dimensional data exist; an angle setting portion for setting a range of inclination angles of polygons with respect to the standard surface or the standard line; an designating portion for designating an allowable range in the inclination angles; a calculating portion for calculating angles made by the polygons and the standard surface or the standard line; and an extracting portion for extracting polygons each having an inclination angle in the allowable range of the inclination angles. Here, each of the portions may be independent of each other and the two portions or more may be comprised of a common resource.
The apparatus further comprises a standard element calculating portion for detecting a standard element which is a surface or a line that is in a specific positional relationship with the standard surface or the polygons. A normal line may preferably be used as the line of the standard element. For example, it is judged whether or not an angle made by two normal lines is in the allowable range. Here, each of the portions may be independent of each other and the two portions or more may be comprised of a common resource.
The recording medium according to further aspect of the present invention records a program for letting a computer execute the processing of: setting a standard surface or a standard line with respect to three-dimensional shape data comprising polygons representing an object in a space where the three-dimensional shape data exist; extracting polygons each having an inclination angle with respect to the standard surface or a referenced line in a predetermined range; and designating a collection of the extracted polygons as an extracted surface.